package db

const TableNameActivityCondition = TablePrefix + "activity_condition"

type ActivityCondition struct {
	BaseModel
	ActivityID uint   `gorm:"column:activity_id;type:int(11);default:0;comment:活动id" json:"activity_id" form:"activity_id"` // 活动id
	Condition  int64  `gorm:"column:condition;type:int(11);default:0;comment:条件" json:"condition" form:"condition"`         // 条件
	Img        string `gorm:"column:img;type:varchar(255);default:'';comment:活动条件图片" json:"img" form:"img"`                 // 活动图片
	Shows      bool   `gorm:"column:shows;type:tinyint(1);default:0;comment:1开启,关闭" json:"shows" form:"shows"`              // 1开启,关闭
}

func (*ActivityCondition) TableName() string {
	return TableNameActivityCondition
}

type ActivityConditionHasManyReward struct {
	ActivityCondition
	Status                  int                                 `json:"status" form:"status"`
	ActivityConditionReward []ActivityConditionRewardHasOneType `gorm:"foreignKey:InviteID;references:ID" json:"activityConditionReward"`
}
